package com.ld.security.server.user.modules.rec.web;

import com.ld.security.common.mybatis.base.vo.DataVo;
import com.ld.security.server.user.modules.rec.service.IRecCardService;
import com.ld.security.server.user.modules.rec.vo.RecCardVo;
import com.ld.security.server.user.modules.ups.util.UpsUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/web/recCard")
public class RecCardWeb {

    @Autowired
    IRecCardService iRecCardService;

    @RequestMapping(value = "/getUserCard")
    public DataVo getUserCard(){
        String id = UpsUtil.getUpsUserId();
        RecCardVo vo  =  iRecCardService.getCard(id);
        return DataVo.of(vo);
    }
}
